package com.ilink.groundservice.mapper.Practice;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ilink.groundservice.entity.PO.Practice.AiXPracticeRecord;
import com.ilink.groundservice.entity.VO.AiX.AiXPracticeRecordResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface AiXPracticeRecordMapper extends BaseMapper<AiXPracticeRecord> {

    /**
     * 分页查询用户实践记录
     */
    IPage<AiXPracticeRecordResponse> selectPracticeRecordPage(Page<AiXPracticeRecordResponse> page, 
                                                              @Param("userId") String userId, 
                                                              @Param("status") String status);

    /**
     * 根据用户ID和项目ID查询实践记录
     */
    AiXPracticeRecordResponse selectPracticeRecordByUserAndProject(@Param("userId") String userId, @Param("projectId") Long projectId);

    /**
     * 获取用户实践统计信息
     */
    Map<String, Object> selectPracticeStatistics(@Param("userId") String userId);

    /**
     * 获取用户已完成的实践项目
     */
    List<AiXPracticeRecordResponse> selectCompletedPracticeRecords(@Param("userId") String userId);

    /**
     * 获取用户正在进行的实践项目
     */
    List<AiXPracticeRecordResponse> selectInProgressPracticeRecords(@Param("userId") String userId);
} 